<?php

/**
 * Description of MantUsuario
 *
 * @author EaDeveloper
 */
class MantUsuario extends FastMaintenance {

    public function __construct() {
        $this->table = "kairos_app_user";
        $this->gridCols = array("USER_NAME", "FIRST_NAME", "LAST_NAME");
        $this->fieldsConfig = array("USER_NAME" => "USUARIO", "FIRST_NAME" => "NOMBRE"
            , "LAST_NAME" => "APELLIDO",
            "STATUS" => array("ESTADO", array("1" => "ACTIVO", "0" => "INACTIVO")),
            "PASSWORD" => array("CLAVE", "password"), "FK_PERFIL" => "PERFIL");
        $this->encryptedCols[] = "PASSWORD";
        $this->pkFields = array("USER_NAME");
        $this->tittle = "Mantenimiento de Usuarios";
        $this->windowTittle = $this->tittle;
        $this->instanceName = "MantUsuario";
        $this->db = DbManager::getMe();
    }

    public function main() {
        $r = $this->db->queryToArray("select * from kairos_app_perfil ");
        $v = array();
        foreach ($r as $f) {
            $v[$f["ID"]] = $f["NAME"];
        }
        $this->fieldsConfig["FK_PERFIL"] = array("PERFIL", $v);
        parent::main();
    }

}

?>
